for cross compiles use cross versions of lupdate, lrelease if found.
authortsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 15 Sep 2014 15:04:58 +0000 (15:04 +0000)
committertsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 15 Sep 2014 15:04:58 +0000 (15:04 +0000)
gpsbabel/configure
gpsbabel/configure.in

index 5fb809ff51204130e79e8b3193660cce379eec0e..1362165fe84f5cd90fe8e3ccc1ce43f6db602035 100755 (executable)
@@ -637,7 +637,9 @@ OSJEEPS
 USB_CFLAGS
 USB_LIBS
 LIBUSBCONFIG
+ac_ct_LRELEASE
 LRELEASE
+ac_ct_LUPDATE
 LUPDATE
 ac_ct_QMAKE
 QMAKE
@@ -4538,10 +4540,11 @@ esac
   fi
 fi
 
-for ac_prog in lupdate-qt5 lupdate-qt4 lupdate
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in lupdate-qt5 lupdate-qt4 lupdate
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_LUPDATE+:} false; then :
@@ -4557,7 +4560,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LUPDATE="$ac_prog"
+    ac_cv_prog_LUPDATE="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4577,15 +4580,73 @@ $as_echo "no" >&6; }
 fi
 
 
-  test -n "$LUPDATE" && break
-done
-
-for ac_prog in lrelease-qt5 lrelease-qt4 lrelease
+    test -n "$LUPDATE" && break
+  done
+fi
+if test -z "$LUPDATE"; then
+  ac_ct_LUPDATE=$LUPDATE
+  for ac_prog in lupdate-qt5 lupdate-qt4 lupdate
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LUPDATE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LUPDATE"; then
+  ac_cv_prog_ac_ct_LUPDATE="$ac_ct_LUPDATE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_LUPDATE="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LUPDATE=$ac_cv_prog_ac_ct_LUPDATE
+if test -n "$ac_ct_LUPDATE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LUPDATE" >&5
+$as_echo "$ac_ct_LUPDATE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_LUPDATE" && break
+done
+
+  if test "x$ac_ct_LUPDATE" = x; then
+    LUPDATE=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LUPDATE=$ac_ct_LUPDATE
+  fi
+fi
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in lrelease-qt5 lrelease-qt4 lrelease
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_LRELEASE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -4599,7 +4660,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LRELEASE="$ac_prog"
+    ac_cv_prog_LRELEASE="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4619,9 +4680,66 @@ $as_echo "no" >&6; }
 fi
 
 
-  test -n "$LRELEASE" && break
+    test -n "$LRELEASE" && break
+  done
+fi
+if test -z "$LRELEASE"; then
+  ac_ct_LRELEASE=$LRELEASE
+  for ac_prog in lrelease-qt5 lrelease-qt4 lrelease
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LRELEASE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LRELEASE"; then
+  ac_cv_prog_ac_ct_LRELEASE="$ac_ct_LRELEASE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_LRELEASE="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LRELEASE=$ac_cv_prog_ac_ct_LRELEASE
+if test -n "$ac_ct_LRELEASE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LRELEASE" >&5
+$as_echo "$ac_ct_LRELEASE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_LRELEASE" && break
 done
 
+  if test "x$ac_ct_LRELEASE" = x; then
+    LRELEASE=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LRELEASE=$ac_ct_LRELEASE
+  fi
+fi
+
 
 if test "$QMAKE" = no ; then
   as_fn_error $? "Qt4 or Qt5 is required, but neither was found" "$LINENO" 5;
index 5ad34d1c2f6d3cfd88e134d3315a9a5766c27e15..1a7da97b06b480f26d56ba9dd4eedd7e19d7fdf7 100644 (file)
@@ -158,8 +158,8 @@ AC_SUBST(RC)
 # If qmake-qt4 isn't found look for the standard name qmake and assume it is
 # from a useful version Qt.
 AC_CHECK_TOOLS(QMAKE, [qmake-qt5 qmake-qt4 qmake], "no")
-AC_CHECK_PROGS(LUPDATE, [lupdate-qt5 lupdate-qt4 lupdate])
-AC_CHECK_PROGS(LRELEASE, [lrelease-qt5 lrelease-qt4 lrelease])
+AC_CHECK_TOOLS(LUPDATE, [lupdate-qt5 lupdate-qt4 lupdate])
+AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease-qt4 lrelease])
 
 if test "$QMAKE" = no ; then
   AC_MSG_ERROR([Qt4 or Qt5 is required, but neither was found]);